#include "StdAfx.h"
#include "fdmamericanexercisestepcondition.h"
#include <ql/exercise.hpp>

namespace QuantLib {

    FdmAmericanExerciseStepCondition::FdmAmericanExerciseStepCondition(
			const Time & americanStartTime,
            const boost::shared_ptr<FdmMesher> & mesher,
            const boost::shared_ptr<FdmInnerValueCalculator> & calculator)
    : FdmAmericanStepCondition(mesher, calculator), americanStartTime_(americanStartTime)
	{				
    }

    void FdmAmericanExerciseStepCondition::applyTo(Array& a, Time t) const 
	{
		if(t >= americanStartTime_)
			FdmAmericanStepCondition::applyTo(a, t);
    }
}
